﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadStyles" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadScripts" runat="server">
<script type="text/javascript" src="/Scripts/m-lhgdialog/m-lhgdialog.js"></script>       
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">

<form id="form1" runat="server">
<%  OrganizationModel Organization = ViewData["Organization"] as OrganizationModel; %>
<input type="hidden" id="hdOrgID" name="hdOrgID" value="<%=Organization.OrgID %>" />
<div class="path">
<strong><%= Organization.NamePath%></strong>
    </div>
    <div class="pd10">
        <div class="mb10 aL">
            <a href="javascript:void(showAdd('<%=Organization.OrgID %>'))" title="添加职位" class="a-btn1" >添加职位</a>
        </div>
          <span id="Grid">
<table class="tb-list hover">
    <tr>
        <th>
            编号
        </th>
        <th>
            名称
        </th>
        <th>
            备注
        </th>
         <th  style=" width:20%">
            操作
        </th>
    </tr>
    <%  IList<AdminGroupModel> AdminGroupList = ViewData["AdminGroupList"] as List<AdminGroupModel>; %>
    <%foreach (var item in AdminGroupList) %> 
    <%{ %>
     <tr>
        <td >
           <%=item.GroupID%>
        </td>
          <td>
           <%=item.GroupName %>
        </td>         
        <td >
           <%=item.Memo %>
        </td>
        <td style="width:20%">
          <a href="javascript:void(showEdit('<%=item.GroupID %>'))">编辑</a> <a href="javascript:void(showRights('<%=item.GroupID %>'))">功能权限</a> <a href="/AdminGroup/Delete?groupID=<%=item.GroupID %>">删除</a> 
        </td>
    </tr>
    <%} %>
</table>
        </span>
    </div>
    </form>
</asp:Content>



<asp:Content ID="Content5" ContentPlaceHolderID="BodyScripts" runat="server"> 
 <script type="text/javascript">
     function showEdit(groupID) {
         OpenPop('/AdminGroup/edit?groupID=' + groupID, "编辑职位", 400, 250);
     };

     function showAdd(orgID) {
         OpenPop('/AdminGroup/edit?orgID=' + orgID, "添加职位", 400, 250);
        };

        function showRights(groupID) {
        	OpenPop('/AdminGroup/Rights?groupID=' + groupID, "编辑权限", 800, 500);
        };

     //打开弹窗
     function OpenPop(url, titleName, width, height) {
         width = width || 800;
         height = height || 500;
         window.top.winObj = window;
         window.top.oDG = new $.dialog({ id: 'esDialog', title: titleName, page: url, width: width, height: height, btnBar: false, lockScroll: false });
         window.top.oDG.ShowDialog();
     }
</script>
</asp:Content>
